#!/usr/bin/python

from pylab import *
from numpy import *
from scipy.optimize import fmin
import matplotlib.pyplot as plt


a = loadtxt('log1');

xtrain = a[:,1]
ytrain = a[:,2]

## Parametric function: 'v' is the parameter vector, 'x' the independent variable
def f(x,y):
	return cos(x/1.3)*sin(y/1.3)*exp(-x*x/50)*exp(-y*y/50) 

dx,dy=0.3,0.3

x = arange(-10., 10., dx)
y = arange(-10., 10., dy)

X,Y = meshgrid(x,y)

Z = f(X,Y)

xt = [1.46]
yt = [0.02]

pcolor(X, Y, Z)
plot(xtrain,ytrain, marker='o', color='r')
colorbar()
axis([-10, 10, -10, 10])
show()

